//
// Sidebar Right
// --------------------------------------------------

.right-section {
  height: 100%;
  .right-container {
    align-items: flex-start;
    bottom: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    height: 100%;
    left: 0;
    right: 0;
    top: 0;
    .right-content {
      flex: 1 1 auto;
      position: relative;
      overflow-x: hidden;
      overflow-y: auto;
      width: 100%;
    }
    .right-header  {
      flex: 0 0 auto;
      width: 100%;
    }
  }
}

.sidebar-right {
  background-color: @body-bg;
  border-left: 1px solid #dadada;
  display: none;
  flex: 0 0 @sidebar-right-width-sm;
  position: relative;
  .dl-horizontal {
    margin: 0 0 @line-height-computed;
    dt {
      text-align: left;
    }
    dd {
      .word-break();
    }
  }
  h3 {
    border-top: 1px solid darken(@page-header-border-color, 2%);
    margin-top: 0;
    padding-top: @line-height-computed;
    &:last-child {
      border-top: 0;
      padding-top: 0;
    }
  }
  .sidebar-header {
    border-color: @page-header-border-color;
    margin-bottom: 0;
    margin-top: 20px;
    h2 {
      margin-left: 20px;
    }
  }
  .sidebar-help {
    color: @gray-light;
  }
}

.show-sidebar-right {
  @media (min-width: @screen-sm-min) {
    display: flex;
    min-height: 100%;
  }
  .middle {
    flex: 1 1 auto;
  }
  .sidebar-right {
    @media (min-width: @screen-sm-min) {
      display: block;
    }
    @media (min-width: @screen-md-min) {
      flex: 0 0 @sidebar-right-width-md;
    }
    @media (min-width: @screen-lg-min) {
      flex: 0 0 @sidebar-right-width-lg;
    }
    @media (min-width: @screen-xl-min) {
      flex: 0 0 @sidebar-right-width-xlg;
    }
    .right-section {
      width: @sidebar-right-width-sm;
      @media (min-width: @screen-md-min) {
        width: @sidebar-right-width-md;
      }
      @media (min-width: @screen-lg-min) {
        width: @sidebar-right-width-lg;
      }
      @media (min-width: @screen-xl-min) {
        width: @sidebar-right-width-xlg;
      }
    }
  }
}

.events-badge {
  font-size: 14px;
  margin-top: 9px;
  &:hover {
    text-decoration: none;
    .event-label {
      text-decoration: underline;
    }
  }
  .event-count {
    color: @text-color;
  }
  .pficon-info {
    color: @gray-pf;
  }
}

.events-sidebar {
  .pficon {
    vertical-align: middle;
    &.pficon-info {
      color: @gray-pf;
    }
  }
  .events-sidebar-collapse {
    margin-left: 3px;
    margin-right: 8px;

    a {
      text-decoration: none;
    }
  }
  .sidebar-header.right-header {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    // So that sidebar bottom border aligns with main content header bottom border.
    margin-top: 0;
    padding-bottom: 22px;
    padding-top: 27px;
    h2 {
      font-size: 14px;
      line-height: 1;
      margin-bottom: 0;
      margin-top: 0;
    }
    .warning-count {
      .nowrap();
      margin-left: 2px;
      .pficon {
        vertical-align: -1px;
      }
    }
    .event-details-link {
      font-size: 11px;
      line-height: 1;
      margin-right: 20px;
    }
  }
  .right-content {
    .event {
      display: flex;
      align-items: center;
      padding: 10px 20px;
      &.highlight {
        background-color: @list-view-expanded-bg;
        border-bottom-width: 0;
        border-color:  @table-border-color !important;
      }
      + .event {
        border-top: 1px solid #ededed;
      }
      .event-icon {
        font-size: 18px;
        margin-right: 10px;
        min-width: 18px;
      }
      .event-details {
        .truncate();
        flex-grow: 1;
        .detail-group {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
        }
        .event-reason, .event-object, .event-message {
          .truncate();
        }
        .event-message {
          .small();
        }
        .event-timestamp {
          .small();
          .text-muted();
        }
        @media (min-width: @screen-lg-min) {
          .detail-group {
            flex-direction: row;
          }
          .event-object {
            order: 1;
          }
          .event-reason {
            order: 2;
          }
          .event-timestamp {
            .text-right();
            margin-left: 5px;
            min-width: 100px;
          }
        }
      }
    }

    .event.highlight + .event {
      border-top: 1px solid #d1d1d1;
    }
  }
}

.events-sidebar-expand a {
  text-decoration: none;
}
